<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/auth/templates/template.xhtml">
	<ui:define name="pageTitle">Incluir Novo Cartão de Crédito</ui:define>
	<ui:define name="body">
		<f:view>
			<p:growl id="messages" autoUpdate="true" closable="true" />
			<h:form id="dados">
				<h:panelGrid cellspacing="10px" styleClass="center">
					<f:facet name="header">Incluir Novo Cartão de Crédito</f:facet>
					<p:focus context="dados" />
					<h:panelGrid cellspacing="10px">
						<h:outputText value="Dados da Despesa" styleClass="header3" />
						<h:inputHidden
							value="#{cartaoCreditoCompraRSBean.cartaoCreditoCompra.idDespesa}" />
						<h:panelGrid columns="2" cellspacing="10px">
							<p:outputLabel value="Bandeira:" for="txtBandeira" />
							<p:selectOneMenu id="txtBandeira"
								value="#{cartaoCreditoCompraRSBean.cartaoCreditoCompra.bandeira}"
								required="true">
								<f:selectItem itemLabel="Selecione uma Bandeira" />
								<f:selectItems value="#{cartaoCreditoCompraRSBean.bandeiras}"
									var="b" itemValue="#{b}" itemLabel="#{b.label}" />
							</p:selectOneMenu>
							<p:outputLabel value="Limite" for="txtLimite" />
							<p:inputText id="txtLimite"
								value="#{cartaoCreditoCompraRSBean.cartaoCreditoCompra.limite}"
								required="true" />
							<p:outputLabel value="Dia Vencimento:" for="txtDiaVencimento" />
							<p:inputText id="txtDiaVencimento"
								value="#{cartaoCreditoCompraRSBean.cartaoCreditoCompra.diaVencimento}"
								required="true" />
						</h:panelGrid>
						<p:commandButton action="#{cartaoCreditoCompraRSBean.salvar}"
							value="Enviar" update="@form" icon="ui-icon-check" />
					</h:panelGrid>
				</h:panelGrid>
			</h:form>
		</f:view>
	</ui:define>
</ui:composition>


</html>